package com.openjava.example.member.domain;

import java.util.Date;

import javax.persistence.*;

import org.ljdp.component.result.ApiResponse;
import org.ljdp.component.result.BasicApiResponse;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 实体
 * @author 子右
 *
 */
@ApiModel("会员信息")
@Entity
@Table(name = "EXAMPLE_MEMBER")
public class ExampleMember extends BasicApiResponse implements ApiResponse {
	
	@ApiModelProperty("会员ID")
	private String memberId;
	
	@ApiModelProperty("会员账号")
	private String memberAccount;
	
	@ApiModelProperty("会员名称")
	private String memberName;
	
	@ApiModelProperty("会员状态")
	private Long memberStatus;
	
	@ApiModelProperty("注册时间")
	private Date registerTime;
	
	
	
	@Id
	@Column(name = "MEMBER_ID")
	public String getMemberId() {
		return memberId;
	}
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
	

	@Column(name = "MEMBER_ACCOUNT")
	public String getMemberAccount() {
		return memberAccount;
	}
	public void setMemberAccount(String memberAccount) {
		this.memberAccount = memberAccount;
	}
	

	@Column(name = "MEMBER_NAME")
	public String getMemberName() {
		return memberName;
	}
	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}
	

	@Column(name = "MEMBER_STATUS")
	public Long getMemberStatus() {
		return memberStatus;
	}
	public void setMemberStatus(Long memberStatus) {
		this.memberStatus = memberStatus;
	}
	
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "REGISTER_TIME")
	public Date getRegisterTime() {
		return registerTime;
	}
	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}
	
}